﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Solidi
{
	public class ListDependencyResolver : GenericDependencyResolver 
	{
		private static readonly Type[] TargetTypes = new Type[]
		{
			typeof(ICollection<>),
			typeof(IList<>),
			typeof(IEnumerable<>)
		};

		public ListDependencyResolver(IDependencyResolver resolver)
            : base(resolver, typeof(ListDependencyFactory<>))
		{
			
		}

		protected override bool IsTargetGenericType(Type genericTypeDefinition)
		{
			return TargetTypes.Contains(genericTypeDefinition);
		}
    }
}
